The present invention relates to memory cache, and more specifically, to systems and methods for optimizing storage controller cache by deleting stale pages from read caches.
In computing systems, memory pages can be paged into and out of real memory due to constraints in the computing system. For example, a memory page can be paged to a secondary memory device (e.g., a hard drive) and stored in the storage controller cache associated with the secondary memory device. Typically, after a memory page is paged out to secondary storage and then paged back into real memory due to a virtual memory demand request, the memory paged in real memory can be modified. When the memory page is paged back into the real memory and then modified, a copy of the unmodified page remains in the storage controller cache, and is thus a stale version that takes up limited storage space in the storage controller cache. In addition, other valid data may migrate from the storage cache controller if additional storage space is needed in the storage controller cache. For example, current least recently used (LRU) algorithms will delete a memory page from the storage controller cache if the memory page is used the least and additional storage controller cache space is needed. As such a valid memory page may be removed from the storage controller cache if it is not used as according to the LRU algorithm. As such, current algorithms do not include the ability to purge stale invalid pages from storage controller cache.